package com.jqh.openglesdemo;

import android.opengl.GLES20;
import android.util.Log;

import com.jqh.openglesdemo.jqhopengl.GLSurfaceView;

public class JqhRender implements GLSurfaceView.GLRender {
    private static final String TAG = "JqhRender";

    public JqhRender() {
    }

    @Override
    public void onSurfaceCreate() {
        Log.d(TAG, "onSurfaceCreate");
    }

    @Override
    public void onSurfaceChanged(int width, int height) {
        Log.d(TAG, "onSurfaceChanged");
        GLES20.glViewport(0, 0, width, height);
    }

    @Override
    public void onDrawFrame() {
        Log.d(TAG, "onDrawFrame");
        GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
        GLES20.glClearColor(1.0f, 0f, 1.0f, 1);
    }
}
